package com.vue3.blog.common.resp;

import lombok.Getter;
import lombok.Setter;

/**
 * @author Mr.小朱同学
 * @version 1.0.0
 * @date 2025/6/9 19:30
 * @description 自定义异常类
 */
@Getter
@Setter
public class BizException extends RuntimeException {
    /**
     * 状态码
     */
    private Integer statusCode;
    /**
     * 提示信息
     */
    private String message;

    public BizException(int statusCode, String message) {
        this.statusCode = statusCode;
        this.message = message;
    }

    public BizException() {
        super();
    }

    public BizException(String message) {
        this.message = message;
    }

    public BizException(String message, Throwable cause) {
        super(message, cause);
    }

    public BizException(Throwable cause) {
        super(cause);
    }

    protected BizException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

}